package com.cmy.lib_room.dao

import androidx.lifecycle.LiveData
import androidx.room.*
import com.cmy.lib_room.entity.BaseEntity

/**
 * 基础包数据库
 */
@Dao
interface BaseDao {

    // 新增数据
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insertClock(entity: BaseEntity)

    /**
     * 查询所有的数据
     * @return
     */
    @SuppressWarnings(RoomWarnings.CURSOR_MISMATCH)
    @Query(" SELECT * FROM BaseEntity" )
    fun getClockAll(): LiveData<List<BaseEntity>?>


}